<?php
class Form_Libro extends Zend_Form{

	public function __construct($options = null){
		parent::__construct($options);

		$this->setName('libro');
		
		$id = new Zend_Form_Element_Hidden('id');

		$autor = new Zend_Form_Element_Text('autor');
		$autor	->setLabel('Autor')
				->setRequired(true)
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->addValidator('NotEmpty');

		$titulo = new Zend_Form_Element_Text('titulo');
		$titulo	->setLabel('Titulo')
				->setRequired(true)
				->addFilter('StripTags')
				->addFilter('StringTrim')
				->addValidator('NotEmpty');

		$submit = new Zend_Form_Element_Submit('Enviar');
		$submit->setAttrib('id', 'submitbutton');
		//$s2 = new Zend_Form_Element_Submit('s2');
		//$submit = new Zend_Form_Element_Submit('submit');
		//$submit->setValue('Login');
		//$submit->setAttrib('value', 'Login');
		//$submit->setLabel('Login');
		$this->addElements(array($id, $autor, $titulo,$submit));
	}
}
?>